<template>
  <div class="auth-wrapper">
    <div class="auth">
      <div class="auth-img">
        <ImageView
          src="/static/image/auth.jpg"
          round
        ></ImageView>
      </div>
      <div class="auth-subtitle">登录小慕读书</div>
      <div class="auth-title">全场好书免费读</div>
      <div class="auth-btn">
        <button
          size="defult"
          open-type="getUserInfo"
          @getuserinfo="getUserInfo"
          lang="zh_CN"
        >授权登录
        </button>
      </div>
    </div>
  </div>
</template>

<script>
import ImageView from '../base/ImageView'
export default {
  components: { ImageView },
  methods: {
    getUserInfo (res) {
      this.$emit('getUserInfo', res)
    }
  }
}
</script>

<style lang="scss" scoped>
.auth-wrapper {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #888888;
  z-index: 999;
  .auth {
    display: flex;
    // justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 268px;
    width: 290px;
    background: #f5f5f5;
    border-radius: 28px;
    position: relative;
    .auth-img {
      width: 74px;
      height: 74px;
      margin: 23px 0 18px 0;
    }
    .auth-subtitle {
      font-size: 14px;
      color: #999999;
      line-height: 22px;
      padding-bottom: 4px;
    }
    .auth-title {
      line-height: 38px;
      font-size: 21px;
      color: #333333;
    }
    .auth-btn {
      position: absolute;
      bottom: 0;
      right: 0;
      width: 100%;
    }
  }
}
</style>
<style lang="scss">
.auth-btn {
  background-color: #4c94f2;
  border-radius: 0 0 28px 28px;
  button {
    background-image: linear-gradient(90deg, #1ea3f5 0%, #0f87fc 100%);
    color: #fff;
    border-radius: 0 0 20px 20px;
    border: 0;
    font-size: 36rpx;
    padding: 8rpx 0;
  }
}
</style>